<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>消息 - 会员中心 -  {:C('UU_SITE_NAME')}</title>
<link href="__ROOT__/{:C('UU_TPL_DIR')}/public/css/user.css" rel="stylesheet" type="text/css">
<include file="public:header" />
<div class="usermain">
  <div class="mleft">
<include file="left_nav" />
  </div>
  
  <div class="mright">
  
    
	
    <div class="mbox">
	  	<div class="utopt">
			  <div class="tit">消息</div>
  				<a class="snav "           href="{:RU('user/msg')}">系统消息</a>
			  <a class="snav select"     href="{:RU('user/pms')}">私信</a>
 
 

			<div class="clear"></div>
	  </div>
	  
	   <div class="user_form_tit">
		<h2>消息详情</h2>
	  </div>
	 
	   
	 
	  <div class="mymsgshow">
		    
		   
		<volist name="list.list" id="li">   
		   <div class="msguser">
					<img src="{$li.user.avatar}">		
		   </div>
		   <div class="msgtxt <eq name="li.send_uid" value="$uid">my</eq>">
		     <div class="txt">
				 <div class="uname">
				{$li.user.username}
						  <span class="time">{$li.addtime_str}</span>
				 </div>
			 {$li.msg}
			 </div>
			 <div class="arrows"></div>
		   </div>
		   <div class="clear"></div>
		   
 </volist>
		   
		   
		   <!--非系统消息允许回复 -->
	 
	    <div class="rform">
		  <div class="rtxt">回消息：</div>
		  <div class="rinput">
		  <textarea name="msg" class="J_msg_show" cols="" rows=""  placeholder="输入消息内容"></textarea>
		  
		  <div class="rbtn">
		  <input type="button" class="btn_green btn_inline btn_border J_send_btn" value="回复"  id="{$Think.get.id}">
		  </div>
		  
		  
		  </div>
		  
		  <div class="clear"></div>
		</div>
		
	 
		  
		  
		  
		  
	    </div>
	  </div>
	    
					
		
		
    </div>
	
	 
	
	
  </div>
   <div class="clear"></div>
</div>
<include file="public:footer" />
<script type="text/javascript">
$(document).ready(function()
{	
	//表单增加高度
	$('.J_msg_show').live('click',function() {
			h=$(this).height();
			if (h==100)
			{
			$(this).animate({ height: "20px"}, 500 );	
			}
			else
			{
			$(this).animate({ height: "100px"}, 500 );
			}
	});	 
//回复操作

$(".J_send_btn").click( function ()
{
	btn=$(this);
	id=btn.attr('id');
	msg=$("textarea[name='msg']").val();
	btn.attr("disabled","disabled").addClass('btn_disabled');
	$.getJSON(ajaxURL,{act: "ajax_pms_reply",id:id,msg:msg}, function(json){	
					if (json.status==0){
						disapperTooltip("remind", json.content);
						btn.removeAttr("disabled").removeClass('btn_disabled');
					}else if (json.status==1){
						disapperTooltip("success",json.content);
						setTimeout(function () { 
							window.location.reload();
						}, 1800);
					}else{
						disapperTooltip("remind","未知错误");
						btn.removeAttr("disabled").removeClass('btn_disabled');
					}
	});

});		
		 
		
});
</script>
</body>
</html>
